<!DOCTYPE html>
<html>
	<head>
		<?php
		include ("src/config/lock.php"); 
		include ("common/include.php");
		?>
	</head>
	<script type="text/javascript" src="js/home.js?v=<?php echo time();?>"></script>
	<script type="text/javascript" src="common-message/common-message-footer.js?v=<?php echo time();?>"></script>
	<script type="text/javascript" src="common-message/common-message-header.js?v=<?php echo time();?>"></script>
	<script type="text/javascript" src="common-message/common-message-popup-sign.js?v=<?php echo time();?>"></script>
	<script>
		$(document).on("pageshow", function(){
			// TODO check if needs to externalize it
			setMessage("home.load.recent",".load_recent");
			setMessage("home.load.older",".load_older");
		});
		
		$(document).on("pageshow","#global",function(){
			loadGlobalSigns();
			manageLink("globalLink");
			
		});
		$(document).on("pageshow","#mine",function(){
			setMessage("no.signs.found.from.masker",".mine_no_sign_found");
			loadMineSignHome(false);
			manageLink("mineLink");
		});
		
		$(document).on("pageshow","#watchers",function(){
			setMessage("no.signs.found.from.watchers",".watchers_no_sign_found");
			loadWatchersSignHome(false);
			manageLink("watchersLink");
		});
		
		function loadMineSignHome(append){
			$(".mine_no_sign_found").hide();
			loadMineSigns(<?php echo $maskerId; ?>, append);
		}
		
		function loadWatchersSignHome(append){
			$(".watchers_no_sign_found").hide();
			loadWatchersSigns(<?php echo $maskerId; ?>, append);
		}
	</script>
	<body>
		<div id="global" data-role="page">
			<?php include ("common/header.php"); ?>
			<div data-role="content" data-scroll="true">
				<div data-form="ui-body-a" class="ui-body-a">
					<div class="link-center"><a href="#" id="load_recent" class="load_recent no-underline" onclick="loadGlobalSigns()"></a></div>
					<ul id="thelist"></ul>
					<div class="link-center"><a href="#" id="load_older" class="load_older no-underline" onclick="loadGlobalSignsOlder()"></a></div>
				</div>
			</div>
			<?php include ("common/popupSign.php"); ?>	 
			<?php include ("common/footer.php"); ?>
	    </div>
	    
	    <!-- ************************************************************************** -->
	    
	    <div id="mine" data-role="page">
	    	<?php include ("common/header.php"); ?>
			<div data-role="content" data-scroll="true">
				<div data-form="ui-body-a" class="ui-body-a">
					<ul id="thelist"></ul>
					<div class="link-center"><a href="#" id="load_older" class="load_older no-underline" onclick="loadMineSignHome(true)"></a></div>
					<div class="no_sign_found mine_no_sign_found hide no_sign_found"></div>
				</div>
			</div>
			<?php include ("common/popupSign.php"); ?>
			<?php include ("common/footer.php"); ?>
	   	</div>
	   	
	   	 <!-- ************************************************************************** -->
	   	
	   	<div id="watchers" data-role="page">
			<?php include ("common/header.php"); ?>
			<div data-role="content" data-scroll="true">
				<div data-form="ui-body-a" class="ui-body-a">
					<div class="link-center"><a href="#" id="load_recent" class="load_recent no-underline" onclick="loadWatchersSignHome(false)"></a></div>
					<ul id="thelist"></ul>
					<div class="link-center"><a href="#" id="load_older" class="load_older no-underline" onclick="loadWatchersSignHome(true)"></a></div>
					<div class="no_sign_found watchers_no_sign_found hide no_sign_found"></div>
				</div>
			</div>
			<?php include ("common/popupSign.php"); ?>	 
			<?php include ("common/footer.php"); ?>
	    </div>
	   	
	   	<!-- ************************************************************************** -->
	   	 
	   	<div id="profile" data-role="page">
	   		<?php include ("common/header.php"); ?>
	   		<?php include ("page/profile.php"); ?>
	   	</div>
	   	
	   	<!-- ************************************************************************** -->
	    
	    <div id="profile_signs" data-role="page">
	    	<?php include ("common/header.php"); ?>
			<?php include ("page/profile_signs.php"); ?>
			<?php include ("common/popupSign.php"); ?>
	   	</div>
	   	
	   	<!-- ************************************************************************** -->
	   	 
	   	<div id="userFollowers" data-role="page">
	   		<?php include ("common/header.php"); ?>
	   		<?php include ("page/followers.php"); ?>
	   	</div>
	   	
	   	<!-- ************************************************************************** -->
	   	 
	   	<div id="userWatchers" data-role="page">
	   		<?php include ("common/header.php"); ?>
	   		<?php include ("page/watchers.php"); ?>
	   	</div>
	   	
	   	<!-- ************************************************************************** -->
	    
	    <div id="questions" data-role="page">
	    	<?php include ("common/header.php"); ?>
			<?php include ("page/questions.php"); ?>
	   	</div>
	   	
	   	<!-- ************************************************************************** -->
	    
	    <div id="signDetailLarge" data-role="page">
	    	<?php include ("common/header.php"); ?>
			<?php include ("page/signDetailLarge.php"); ?>
			<?php include ("common/popupSign.php"); ?>
	   	</div>
	</body>
</html>
